package com.neusoft.elmboot.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.po.TranDetail;

import com.neusoft.elmboot.service.TranDetailService;


@RestController
@RequestMapping("/TranDetailController")
public class TranDetailController {
	@Autowired
	 private TranDetailService trandetailService;
	@RequestMapping("/saveTranDetail")
	 public int saveTranDetail(TranDetail trandetail) throws Exception{
	 return trandetailService.saveTranDetail(trandetail);
	 }
	
	@RequestMapping("/listDetailByUserId")
	 public List<TranDetail> listDetailByUserId(TranDetail trandetail) throws Exception{
		 return trandetailService.listDetailByUserId(trandetail.getUserId());
	 }

}
